﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Sinacor.Service.Infra.AuthorizationService.Service.ServiceImplementation.Translator
{
    public class PolicyStatusTranslator
    {
        public void Translate(BusinessEntity.Enum.PolicyStatus? from, out DataContract.Enum.PolicyStatus? to)
        {
            switch (from)
            {
                case BusinessEntity.Enum.PolicyStatus.Active:
                    to = DataContract.Enum.PolicyStatus.Active;
                    break;
                case BusinessEntity.Enum.PolicyStatus.Inactive:
                    to = DataContract.Enum.PolicyStatus.Inactive;
                    break;
                default:
                    to = null;
                    break;
            }
        }

        public void Translate(DataContract.Enum.PolicyStatus? from, out BusinessEntity.Enum.PolicyStatus? to)
        {
            switch (from)
            {
                case DataContract.Enum.PolicyStatus.Active:
                    to = BusinessEntity.Enum.PolicyStatus.Active;
                    break;
                case DataContract.Enum.PolicyStatus.Inactive:
                    to = BusinessEntity.Enum.PolicyStatus.Inactive;
                    break;
                default:
                    to = null;
                    break;
            }
        }
    }
}
